package com.itheima.demo4_继承的访问规则.p03非私有内容;

public class Test {
    public static void main(String[] args) {
        Zi zi = new Zi();
        System.out.println(zi.num);//10
        zi.method();//Fu method
        zi.show();//10  Fu method
    }
}

class Fu {
    int num = 10;

    public void method() {
        System.out.println("Fu method");
    }
}

class Zi extends Fu {
    public void show() {
        System.out.println(num);
        method();
    }
}